import java.awt.*;
import javax.swing.*;
public class FlowLayoutDemo{
public static void main(String args[]){
	   JFrame frame=new JFrame("FlowLayout");    //һ
           Container c=frame.getContentPane();                       //õܵݴ
           FlowLayout f=new FlowLayout(FlowLayout.LEFT,10,10);    //FlowLayoutĶ
           c.setLayout(f);                                                           //Ϊòֹ
    	   for (int i=1;i<=5;i++){
           	c.add(new JButton("ť"+i));                         //Ӱť
            }
           frame.setSize(250,200);                                            //ÿܴС
           frame.setVisible(true);                                              //ÿܿ
}
}
